package com.wxq.demo.service;

import com.wxq.demo.model.User;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class HelloReceive {
    @RabbitListener(queues = "queue")
    public void process(String str) {
        System.out.println("Receive:" + str);
    }

    @RabbitListener(queues = "userQueue")
    public void receiveUser(User user) {
        System.out.println("Receive:" + user.getUsername() + ";" + user.getPassword());
    }
}
